<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'article-form',
	'enableAjaxValidation'=>false,
        'htmlOptions'=>array('enctype' => 'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'summary'); ?>
		<?php echo $form->textField($model,'summary',array('size'=>60,'maxlength'=>1024)); ?>
		<?php echo $form->error($model,'summary'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'uploads'); ?>
                <?php
                      $this->widget('CMultiFileUpload', array(
                         'model'=>$model,
                         'name'=>'uploads',
                         'attribute'=>'files',
                         'accept'=>'jpg|png|gif|mp3',
                         'max'=>5,
                         'duplicate'=>'Duplicated upload files',
                         'denied'=>'Not allowed file types',
                      ));
                ?>
		<?php echo $form->error($model,'uploads'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'display'); ?>
		<?php echo $form->checkBox($model,'display'); ?>
		<?php echo $form->error($model,'display'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'hot'); ?>
		<?php echo $form->checkBox($model,'hot'); ?>
		<?php echo $form->error($model,'hot'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'categoryid'); ?>
		<?php echo $form->dropDownList($model,'categoryid', $model->getCategoryOptions()); ?>
		<?php echo $form->error($model,'categoryid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'seriesid'); ?>
		<?php echo $form->dropDownList($model,'seriesid', array(0=>'None','Series'=>$model->getSeriesOptions())); ?>
		<?php echo $form->error($model,'seriesid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'localeid'); ?>
		<?php echo $form->dropDownList($model,'localeid', $model->getLocaleOptions()); ?>
		<?php echo $form->error($model,'localeid'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>
        
</div><!-- form -->